<style>
   .table input{
       width: 100% !important;
   }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Store_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-store_id" data-rule="required" data-source="booking/store/index" class="form-control selectpage" name="row[store_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type_config_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-type_config_id" data-rule="required" data-source="booking/config/index" data-params='{"custom[type]":"house"}' class="form-control selectpage" name="row[type_config_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Floor_config_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-floor_config_id" data-rule="required" data-source="booking/config/index" data-params='{"custom[type]":"floor"}' class="form-control selectpage" name="row[floor_config_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tag_config_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tag_config_ids" data-rule="required" data-source="booking/config/index" data-params='{"custom[type]":"tag"}' data-multiple="true" class="form-control selectpage" name="row[tag_config_ids]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Facility_config_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-facility_config_ids" data-rule="required" data-source="booking/config/index" data-params='{"custom[type]":"facility"}' data-multiple="true" class="form-control selectpage" name="row[facility_config_ids]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Wifi_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-wifi_ids" data-source="booking/wifi/index" class="form-control selectpage" data-multiple="true" name="row[wifi_ids]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Room')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-room" data-rule="required" class="form-control" name="row[room]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Market_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-market_price" data-rule="required" class="form-control" step="0.01" name="row[market_price]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="0.00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Intro')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-intro" class="form-control" rows="5" name="row[intro]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Notes_in')}:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="fieldlist table" data-template="notes_intpl" data-name="row[notes_in]" data-tag="tr">
                <tr>
                    <td>{:__('Notes_in key')}</td>
                    <td>{:__('Notes_in value')}</td>
                    <td></td>
                </tr>
                <tr>
                    <td colspan="3">
                        <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a>
                    </td>
                </tr>
                <textarea name="row[notes_in]" class="form-control hide" cols="30" rows="5"></textarea>
            </table>
            <script id="notes_intpl" type="text/html">
                <tr class="form-inline">
                    <td>
                        <select id="c-has" class="form-control selectpicker" name="<%=name%>[<%=index%>][has]">
                            <option value="1" <%=row.has=='1'?'selected':''%> >含有</option>
                            <option value="0" <%=row.has=='0'?'selected':''%> >没有</option>
                        </select>
                    </td>
                    <td>
                        <input type="text" name="<%=name%>[<%=index%>][content]" class="form-control" value="<%=row.content%>" size="30" placeholder="内容"/>
                    </td>
                    <td>
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Area')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-area" data-rule="required" class="form-control" step="0.01" name="row[area]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Livenums')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-livenums" data-rule="required" class="form-control" name="row[livenums]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Checkin_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-checkin_time" data-rule="required" class="form-control datetimepicker" data-date-format="HH:00:00" data-use-current="true" name="row[checkin_time]" type="text" value="15:00:00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Checkout_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-checkout_time" data-rule="required" class="form-control datetimepicker" data-date-format="HH:00:00" data-use-current="true" name="row[checkout_time]" type="text" value="12:00:00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('To_shop_pay')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-to_shop_pay" class="form-control selectpicker" name="row[to_shop_pay]">
                {foreach name="toShopPayList" item="vo"}
                    <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="interval_time form-group hide">
        <label class="control-label col-xs-12 col-sm-2">{:__('Interval_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-interval_time" class="form-control datetimepicker" data-date-format="HH:00:00" data-use-current="true" name="row[interval_time]" type="text" value="21:00:00">
        </div>
    </div>
<?php if(isset($admin["id"]) && $admin["id"]==1){ ?>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="down"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
<?php } ?>
    {if !empty($fields)}
    <hr>
    <div class="form-group">
        <div class="text-center">自定义数据</div>
    </div>
    {/if}
    <!-- 渲染自定义字段 -->
    {include file="booking/common/fields"}

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
